Summary — Use with LATEX

In summary, to use the LATEX facilities of GNUPLOT, the first command to GNUPLOT should be
\begin{syntax}
set terminal latex
\end{syntax}
and the output of GNUPLOT should be directed to a file, for example,
    set output "plot.tex"
This may be anything you like but it should have a .tex extension, of course. Then the size of the plot should be given. For example, the command
    set size 1,2
tells GNUPLOT to use a 5 inch wide by 6 inch high box for the plot. The numbers given are scale factors, not the actual size. The default is 5 inches by 3 inches. This is the size of the complete plot, including all labels.

When finished, the file will contain all of the plots you have specified (you probably only want one plot per file). This file can then be used in a LATEX document, ,

    \begin {figure}
      \begin{center}
        \input{plot}
      \end{center}
    \end {figure}
This puts the plot into a figure.

You will also want to read about the following commands: set title, set xlabel, set ylabel, set key, set label, set xtics, set ytics, and set clip. These are all described in the regular GNUPLOT manual.